#导入蓝图模块
from genericpath import exists
from posixpath import join
from flask import Blueprint,request,json,jsonify
#实例化蓝图
bp_video=Blueprint("video",__name__) 



# 导入数据库
from db import db1


#导入文件操作os模块
import os

#图片上传
@bp_video.route('/addpic',methods=['POST'])
def addpic():
    file = request.files['file']
    file.save(os.path.join('./static/upload/',file.filename))
    return jsonify({"code":200,'pic':file.filename})
